<div class="offices view">
<h2><?php  echo __('Office'); ?></h2>
	<dl>
		<dt><?php echo __('O Id'); ?></dt>
		<dd>
			<?php echo h($office['Office']['o_id']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('O Name'); ?></dt>
		<dd>
			<?php echo h($office['Office']['o_name']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('O Address'); ?></dt>
		<dd>
			<?php echo h($office['Office']['o_address']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('O Postcode'); ?></dt>
		<dd>
			<?php echo h($office['Office']['o_postcode']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('O Phone'); ?></dt>
		<dd>
			<?php echo h($office['Office']['o_phone']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('O Email'); ?></dt>
		<dd>
			<?php echo h($office['Office']['o_email']); ?>
			&nbsp;
		</dd>
	</dl>
</div>
<div class="actions">
	<h3><?php echo __('Actions'); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__('Edit Office'), array('action' => 'edit', $office['Office']['o_id'])); ?> </li>
		<li><?php echo $this->Form->postLink(__('Delete Office'), array('action' => 'delete', $office['Office']['o_id']), null, __('Are you sure you want to delete # %s?', $office['Office']['o_id'])); ?> </li>
		<li><?php echo $this->Html->link(__('List Offices'), array('action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Office'), array('action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Interactions'), array('controller' => 'interactions', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Interaction'), array('controller' => 'interactions', 'action' => 'add')); ?> </li>
	</ul>
</div>
<div class="related">
	<h3><?php echo __('Related Interactions'); ?></h3>
	<?php if (!empty($office['Interaction'])): ?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php echo __('I Id'); ?></th>
		<th><?php echo __('I Date'); ?></th>
		<th><?php echo __('I Type'); ?></th>
		<th><?php echo __('I Details'); ?></th>
		<th><?php echo __('E Id'); ?></th>
		<th><?php echo __('O Id'); ?></th>
		<th class="actions"><?php echo __('Actions'); ?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($office['Interaction'] as $interaction): ?>
		<tr>
			<td><?php echo $interaction['i_id']; ?></td>
			<td><?php echo $interaction['i_date']; ?></td>
			<td><?php echo $interaction['i_type']; ?></td>
			<td><?php echo $interaction['i_details']; ?></td>
			<td><?php echo $interaction['e_id']; ?></td>
			<td><?php echo $interaction['o_id']; ?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View'), array('controller' => 'interactions', 'action' => 'view', $interaction['i_id'])); ?>
				<?php echo $this->Html->link(__('Edit'), array('controller' => 'interactions', 'action' => 'edit', $interaction['i_id'])); ?>
				<?php echo $this->Form->postLink(__('Delete'), array('controller' => 'interactions', 'action' => 'delete', $interaction['i_id']), null, __('Are you sure you want to delete # %s?', $interaction['i_id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('New Interaction'), array('controller' => 'interactions', 'action' => 'add')); ?> </li>
		</ul>
	</div>
</div>
